<?php 
  if (
    $sf_request->getParameter('module') !== 'session' && 
    $sf_request->getParameter('action') !== 'new'
  ): 
?>
  <p>您需要登录才能访问此页面</p>
<?php endif ?>
<form action="<?php echo url_for('@session_create') ?>" method="post">
  <?php echo $form->renderGlobalErrors() ?>
  <?php echo $form['account']->renderError() ?>
  <?php echo $form['password']->renderError() ?>
  <table>
    <tr>
      <td><?php echo $form['account']->renderLabel('帐号') ?></td>
      <td><?php echo $form['account'] ?></td>
    </tr>
    <tr>
      <td><?php echo $form['password']->renderLabel('密码') ?></td>
      <td><?php echo $form['password'] ?></td>
    </tr>
    <tr>
      <td><?php echo $form->renderHiddenFields() ?></td>
      <td><input type="submit" value="登陆" /></td>
    </tr>
  </table>
</form>
